Technology of detecting the pitches (pitch frequencies) of the sound of a musical instrument played in real time or the pitches (pitch frequencies) of a person's voice has been developed and researched in order to extract performance information data on the performing sound of the musical instrument or the person's voice or to play real-time music in concert.
Methods usually used to detect pitches include a frequency analysis method of analyzing the frequency of a digital signal of performing sound or voice, a period calculation method of calculating a peak or zero-crossing period of a waveform in order to calculate the period of a wave and analyzing the result of calculation, and an autocorrelation method of analyzing the autocorrelation of a waveform.
Among these pitch detection methods, in the frequency analysis method, a digital signal is analyzed at predetermined time intervals. A pitch is determined with a predetermined error range depending on the predetermined time interval.
For example, in the case of FFT (Fast Fourier Transform) used for the frequency analysis method, a digital signal input during each predetermined time interval (hereinafter, referred to as an index) is converted into a frequency. When a sampling rate and an FFT window size are fixed, the error range for the frequency is determined by the range of the index. This operation will be described with reference to the following formulas.
When a sampling rate for FFT is 22,050 Hz and an FFT window size is 1024, a frequency detected through the FFT is expressed as Formula (1).
                              FFT          ⁡                      (            F            )                          =                                            Sampling              ⁢                                                          ⁢              rate                                      FFT              ⁢                                                          ⁢              window              ⁢                                                          ⁢              size                                ×                                    Index              +                              (                                  Index                  -                  1                                )                                      2                                              (        1        )            
Here, actual frequency range FR is determined according to Formula (2).
                    FR        =                                                            Sampling                ⁢                                                                  ⁢                rate                                            FFT                ⁢                                                                  ⁢                window                ⁢                                                                  ⁢                size                                      ×                          (                              Index                -                1                            )                                ∼                                                    Sampling                ⁢                                                                  ⁢                rate                                            FFT                ⁢                                                                  ⁢                window                ⁢                                                                  ⁢                size                                      ×                          (              Index              )                                                          (        2        )            
Accordingly, when the index of a peak with respect to a fundamental frequency is 7 as the result of performing FFT analysis on a note C3 tuned on a piano, if the index of 7 and the above-described conditions (sampling rate and FFT window size) are applied to Formulas (1) and (2), the frequency transformation result and actual frequency range with respect to the index of 7, i.e., a seventh frequency, are calculated by Formula (3) and Formula (4), respectively.
Formula (3) directs to the calculation of the frequency transformation result, and Formula (4) directs to the calculation of an error range for the frequency transformation result.
                              FFT          ⁡                      (            F            )                          =                              22050            1024                    ×                                    7              +                              (                                  7                  -                  1                                )                                      2                                              (        3        )                                                          ⁢                  =                                    22050              1024                        ×            6.5                                                                                                        ⁢                  =                      139.96            ⁢                                                  ⁢                          (              Hz              )                                                                                                    FR          FFT                =                                            22050              1024                        ×                          (                              7                -                1                            )                                ∼                                    22050              1024                        ×            7                                              (        4        )                                                          ⁢                  =                      129.19            ∼            150.73                                                          
That is, a frequency, which is detected by performing the FFT on the note C3 of the piano under the above conditions, is 139.96 Hz, and the actual frequency range of the frequency is (129.19˜150.73) Hz. Accordingly, the detected frequency has an error range of about 21.53 Hz (150.73-129.192=21.53).
Consequently, when using the FFT in order to detect the pitches of the sound of a musical instrument, a pitch detection error is small in a high-frequency band, in which a frequency interval between notes is equal to or greater than 21.53 Hz, but is large in a low-frequency band, in which a frequency interval between notes is less than 21.53 Hz.